import 'package:Smart/res/colors_res.dart';
import 'package:Smart/utils/routers/page_jump_service.dart';
import 'package:flutter/material.dart';
import 'package:Smart/pages/productor008/studytest/pages/refresh_page.dart';
import 'package:Smart/pages/productor008/studytest/pages/swiper_page.dart';

class StudyMain008 extends StatefulWidget {
  final String name;
  StudyMain008(this.name);

  @override
  _StudyMain008 createState() => _StudyMain008();
}

class _StudyMain008 extends State<StudyMain008> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          leading: GestureDetector(
            onTap: () {
              PageJumpService.instance().goBack();
            },
            child: Icon(
              Icons.arrow_back_ios,
              size: 20,
              color: Color(0XFF231815),
            ),
          ),
          backgroundColor: ColorsRes.color_ffffff,
          title: Text(
            "${widget.name}- 学习练习",
            style: TextStyle(color: ColorsRes.color_000000),
          ),
        ),
        body: Container(
          child: Center(
            child:Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                RaisedButton(
                  child: Text('轮播图'),
                  color: Colors.blue,
                  onPressed: () {
                    print('轮播图');
                    PageJumpService.instance().goTo(SwiperPage());
                  },
                ),
                RaisedButton(
                  child: Text('上拉刷新，下拉加载'),
                  color: Colors.blue,
                  onPressed: () {
                    print('上拉刷新，下拉加载');
                    PageJumpService.instance().goTo(RefreshPage());
                  },
                ),
              ]
            )
          )
        )
      );
  }
}
